<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript" src="scripts/boot.js"></script>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;width: 100%;height: 100%">
<div class="mini-fit" >
    <div id="datagrid1" class="mini-datagrid " idField="id" pageSize="20"
		url="leave_approve_view.do" 
		style="width:100%;height:100%;" allowCellSelect="true" multiSelect="true">
		<div property="columns">
			<div type="indexcolumn" headerAlign="center">#</div>
			<div field="leaveTypeName" width="100" headerAlign="center" align="center">休假类型</div>
			<div field="startTime" width="100" allowSort="true" headerAlign="center" align="center">休假开始时间</div>
			<div field="endTime" width="100" allowSort="true" headerAlign="center" align="center">休假结束时间</div>
			<div field="days" width="100" headerAlign="center" align="center">休假天数</div>
			<div width="120" headerAlign="center" align="center" renderer="onActionRenderer">相关操作</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	mini.parse();
	var grid = mini.get("datagrid1");
	grid.reload();
	
	function onActionRenderer(e) {
	    var s = "<a href='javascript:seeDetails();'>查看详细</a>";
	    return s;
	}
	
	//查看详情
	function seeDetails() {
	    var row = grid.getSelected();
	    if (row) {
	        mini.open({
	            url: "init_leave_details.do",
	            allowResize:false,
	            title: "休假单信息", width: 500, height: 430,
	            onload: function () {
	                var iframe = this.getIFrameEl();
	                var data = { row: row };
	                iframe.contentWindow.SetData(data);
	            }
	        });
	        
	    }
	}
	
</script>
</body>
</html>